package com.rykj.qxj.server.services.impl;

import com.rykj.qxj.server.dao.DataCountAppMapper;
import com.rykj.qxj.server.dao.DataCountMapper;
import com.rykj.qxj.server.model.entity.DataCount;
import com.rykj.qxj.server.model.entity.DataCountApp;
import com.rykj.qxj.server.services.IDataCountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("dataCountService")
public class DataCountServiceImpl implements IDataCountService {
    @Resource
    private DataCountMapper dataCountMapper;
    @Resource
    private DataCountAppMapper dataCountAppMapper;

    @Override
    public void saveBatchDataCount(List<DataCount> dataCounts) {
        if(dataCounts!=null&&dataCounts.size()>0){
            dataCountMapper.saveBatchDataCount(dataCounts);
        }
    }

    @Override
    public void saveBatchDataAppCount(List<DataCountApp> dataAppCounts) {
        if(dataAppCounts!=null&&dataAppCounts.size()>0){
            dataCountAppMapper.saveBatchDataAppCount(dataAppCounts);
        }
    }
}
